﻿<div class="node<?php if ($sticky) { print ' sticky'; } ?><?php if (!$status) { print ' node-unpublished'; } ?>">
  <?php if ($page == 0): ?>  
	  <?php if(!isset($node->og_groups)) { ?>
	  <h2><a href="<?php print $node_url ?>" title="<?php print $title ?>"><?php print $title ?></a></h2>
	  <?php
	    }else{
	      foreach($node->og_groups as $k) {	        
	        $gid = $k;
	      }
	      
	    	$group_url = "node/" . $gid;
	    	$group_url = drupal_get_path_alias($group_url);
	    	
	    	if(strlen(trim($node->og_groups_both[$gid])) > 0) {
	    		$link = "<a href=\"" . base_path() . $group_url . "\" class=\"group_link\">" . $node->og_groups_both[$gid]. "</a> → ";
	    	} else {
	    		$link = "";
	    	}
	  ?>
	  <h2><?php print $link ?><a href="<?php print $node_url ?>" title="<?php print $title ?>"><?php print $title ?></a></h2>
	  <?php
	    }
	  ?>
	<?php endif; ?>

  <?php if ($picture) print $picture; ?>  
  
  <?php if ($submitted): ?>
    <span class="submitted"><?php print t('Posted ') . format_date($node->created, 'custom', "F jS, Y") . t(' by ') . theme('username', $node); ?></span> 
  <?php endif; ?>

  <?php if (count($taxonomy)): ?>
    <div class="taxonomy"><?php print t(' in ') . $terms ?></div>
  <?php endif; ?>
  
  <div class="content" style="overflow:hidden">
    <?php print $content; ?>
  </div>
  
  <?php if ($links): ?>
    <div class="links">
      <?php print $links; ?>
    </div>
  <?php endif; ?>  
</div>
